#ifndef MW_TEST_COMMON_H
#define MW_TEST_COMMON_H


/*
  
 */


#include <mw-common.h>


G_BEGIN_DECLS


void test_type_readwrite(gpointer item, 
			 MwNewFunc newf, MwFreeFunc freef,
			 MwWriteFunc writef, MwReadFunc readf, 
			 MwEqualFunc eqf);


void test_type_copy(gpointer item, MwNewFunc newf, MwFreeFunc freef,
		    MwCopyFunc copyf, MwEqualFunc eqf);


void test_type_dup(gpointer item, MwDupFunc dupf, MwFreeFunc freef,
		   MwEqualFunc eqf);


void test_hash_equal(gpointer item, MwHashFunc hashf, MwEqualFunc eqf);


void test_compound_type(gpointer item,
			MwNewFunc newf,
			MwDupFunc dupf,
			MwCopyFunc copyf,
			MwReadFunc readf,
			MwWriteFunc writef,
			MwClearFunc clearf,
			MwFreeFunc freef,
			MwHashFunc hashf,
			MwEqualFunc eqf);


#define TEST_COMPOUND_TYPE(item, type_long_name)	\
  test_compound_type((item),				\
		     (type_long_name ## _new),		\
		     (type_long_name ## _dup),		\
		     (type_long_name ## _copy),		\
		     (type_long_name ## _read),		\
		     (type_long_name ## _write),	\
		     (type_long_name ## _clear),	\
		     (type_long_name ## _free),		\
		     (type_long_name ## _hash),		\
		     (type_long_name ## _equal))



G_END_DECLS


#endif /* MW_TEST_COMMON_H */
